//
//  UIImage+Ex.m
//  Health
//
//  Created by mykoma on 14/11/3.
//  Copyright (c) 2014年 scu.edu. All rights reserved.
//

#import "UIImage+Ex.h"

@implementation UIImage (Ex)

- (NSData *)data
{
    NSData * data = UIImagePNGRepresentation(self);
    if (data == nil) {
        data = UIImageJPEGRepresentation(self, 0);
    }
    return data;
}

@end
